<?php

/**
 * WebUser class
 *
 * @author Julot <andy.julot@gmail.com>
 * @since Monday, January 30, 2012. 09:03 AM
 */
class WebUser extends CWebUser {

	public function getMenu() {
		$user = Yii::app()->user;
		return array(
			array(
				'label'=>'Home',
				'url'=>array('/site/index')
			),
			array(
				'label'=>'Jadwal',
				'url'=>array(
					'/site/page',
					'view'=>'schedule'
				)
			),
			array(
				'label'=>'Kesaksian',
				'url'=>array('/testimony')
			),
			array(
				'label'=>'Outlet',
				'url'=>array(
					'/site/page',
					'view'=>'outlet'
				)
			),
//			array(
//				'label'=>'Contact',
//				'url'=>array('/site/contact')
//			),
			array('label'=>'Login',
				'url'=>array('/site/login'),
				'visible'=>$user->isGuest),
			array(
				'label'=>'Logout (' . $user->name . ')',
				'url'=>array('/site/logout'),
				'visible'=>!$user->isGuest
			),
		);
	}

}
